function ComboView(config) {

	var self = this;
	this.div = 'nodiv';
	this.excludeValues = {};
	this.items = [];
	this.showItems = [];
	this.value = null;
	var cfg = copyConfig({
		width: 80,
		height: 22,
		nullItem: null,
		idProp: 'id',
		valueProp: 'name',
		displayProp: 'name',
		requestEvent: 'items-request',
		updateEvent: 'items-loaded'
	}, config);
	$.subscribe(cfg.updateEvent, function (event, data) {
		self.updateItems(data.items);
	});

	this.render = function(div) {
		this.div = div;
		el(div).jqxComboBox({ width: cfg.width, height: cfg.height, valueMember: 'id', displayMember: cfg.valueProp });
		$.publish(cfg.requestEvent, { updateFn: function(items) {
			self.updateItems(items);
		} });
		el(div).on('change', function (event) {
			self.value = null;
			if(event.args.item != null) {
				self.value = event.args.item.originalItem;
			}
		});
		return this;
	};

	this.updateItems = function(items) {
		this.items = items;
		this.showItems = [];
		if(cfg.nullItem != null) {
			this.showItems.push(cfg.nullItem);
		}
		var selectedIndex = -1;
		$.each(items, function(index, item) {
			if(!(item[cfg.valueProp] in self.excludeValues)) {
				self.showItems.push(item);
				if(self.value != null && item[cfg.valueProp] === self.value[cfg.valueProp]) {
					selectedIndex = index;
				}
			}
		});
		if(selectedIndex < 0) {
			this.value = this.showItems.length > 0? this.showItems[0]: null;
			selectedIndex = 0;
		}
		el(this.div).jqxComboBox({
			source: this.showItems,
			valueMember: cfg.valueProp,
			displayMember: cfg.displayProp,
			selectedIndex: selectedIndex
		});
	};

	this.selectByValue = function(value) {
		var selectedIndex = -1;
		$.each(this.showItems, function(index, item) {
			if(value === item[cfg.valueProp]) {
				selectedIndex = index;
				return false;
			}
		});
		el(this.div).jqxComboBox('selectIndex', selectedIndex);
	};

	this.selectById = function(id) {
		var selectedIndex = -1;
		$.each(this.showItems, function(index, item) {
			if(id === item[cfg.idProp]) {
				selectedIndex = index;
				return false;
			}
		});
		el(this.div).jqxComboBox('selectIndex', selectedIndex);
	};

	this.exclude = function(value) {
		this.excludeValues[value] = value;
		this.updateItems(this.items);
	};

	this.disexclude = function(value) {
		if(value in this.excludeValues) {
			delete this.excludeValues[value];
			this.updateItems(this.items);
		}
	};
};